import type { GreasyForkElements } from '../../../../../../../../types/constants/personalization/greasy_fork'
import {
  PAGE_ELEMENTS,
  PROJECT_PREFIX,
  SUPPORTED_PLATFORMS,

} from '../../../../../../../../types/constants'
import { CommonPage } from './common'

export class HelpPage {
  elements: GreasyForkElements = PAGE_ELEMENTS[SUPPORTED_PLATFORMS.GREASY_FORK]
  private static instance: HelpPage
  private commonPage: CommonPage = CommonPage.getInstance()

  /**
   * 获取单例实例
   */
  public static getInstance(): HelpPage {
    if (!HelpPage.instance) {
      HelpPage.instance = new HelpPage()
    }
    return HelpPage.instance
  }

  init(): void {}

  getMainStyles(): string {
    return `
.text-content {
  background-color: var(--${PROJECT_PREFIX}-theme-bg-base) !important;
  color: var(--${PROJECT_PREFIX}-theme-text-secondary) !important;
  border: none !important;
  box-shadow: none !important;
  margin-top: 0 !important;
  padding: 16px !important;
  
  a {
    ${this.commonPage.linkStyles()}
  }
}
`
  }
}
